password entry: Make the Caps Lock icon less prominent
authorMatthias Clasen <mclasen@redhat.com>
Fri, 15 Mar 2019 00:03:34 +0000 (20:03 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 15 Mar 2019 00:03:34 +0000 (20:03 -0400)
Set a style class, and theme the Caps Lock icon to
be  less promient, so it does not appear clickable.

gtk/gtkpasswordentry.c
gtk/theme/Adwaita/_common.scss

index b096b3d578513ff3537dd999ac5e7ef8765e1153..08467ad50983ce781ab9512c7d4da0f08f6d2037 100644 (file)
@@ -118,6 +118,7 @@ gtk_password_entry_init (GtkPasswordEntry *entry)
 
   priv->icon = gtk_image_new_from_icon_name ("caps-lock-symbolic");
   gtk_widget_set_tooltip_text (priv->icon, _("Caps Lock is on"));
+  gtk_style_context_add_class (gtk_widget_get_style_context (priv->icon), "caps-lock-indicator");
   gtk_widget_set_cursor (priv->icon, gtk_widget_get_cursor (priv->entry));
   gtk_container_add (GTK_CONTAINER (priv->box), priv->icon);
 
index 4ff67055592f6462f4b79d054c5a248af7c95d3d..dd26261c7356a91daf916743f51b445d49fa5b02 100644 (file)
@@ -338,6 +338,10 @@ entry {
       &:backdrop { color: mix($backdrop_fg_color, $backdrop_base_color, 80%); }
     }
 
+    &.password image.caps-lock-indicator {
+      color: mix($backdrop_fg_color, $backdrop_base_color, 80%);
+    }
+
     &:drop(active) {
       &:focus, & {
         border-color: $drop_target_color;